//
//  SheetView.swift
//  animations
//
//  Created by Ekaterina on 09.01.2023.
//

import SwiftUI

struct SheetView: View {
    @Environment (\.dismiss) var dismiss
    
    var body: some View {
        VStack {
            VStack {
                Button("Dismiss") {
                    dismiss()
                }
            }
            .frame(maxWidth: .infinity, alignment: .leading)
            
            VStack {
                Text("This is presented view")
            }
            .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity)
        .padding(24)
    }
}
struct SheetView_Previews: PreviewProvider {
    static var previews: some View {
        SheetView()
    }
}
